Skip to content

chore: fix test warnings across test suite#1844

Open
WilliamBergamin wants to merge 3 commits intomainfrom
fix-test-warnings
Open

chore: fix test warnings across test suite#1844
WilliamBergamin wants to merge 3 commits intomainfrom
fix-test-warnings

Conversation

@WilliamBergamin
Copy link
Contributor

@WilliamBergamin WilliamBergamin commented Mar 20, 2026

Summary

This PR aims to fix warnings in our unit tests and improve the maintainers scripts

Testing

CI should be sufficient

Category

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs (Documents)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

@WilliamBergamin WilliamBergamin added this to the 3.41.1 milestone Mar 20, 2026
@WilliamBergamin WilliamBergamin self-assigned this Mar 20, 2026
@WilliamBergamin WilliamBergamin requested a review from a team as a code owner March 20, 2026 16:58
@WilliamBergamin WilliamBergamin added tests M-T: Testing work only semver:patch labels Mar 20, 2026
@codecov
Copy link

codecov bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.99%. Comparing base (0cb9728) to head (8b3b8cf).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1844   +/-   ##
=======================================
  Coverage   83.99%   83.99%           
=======================================
  Files         117      117           
  Lines       13252    13252           
=======================================
  Hits        11131    11131           
  Misses       2121     2121           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WilliamBergamin I left a question about the updates to validation script that give me some pause to approval. Please do let me know if I'm overlooking something in updates 🙏

# all: ./scripts/run_validation.sh
# single: ./scripts/run_validation.sh tests/slack_sdk_async/web/test_web_client_coverage.py

set -e
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔭 question: Keeping this would cause this script to exit with error code to break CI I thought? Would this be related to deprecation changes otherwise?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question, in CI we don't use this bash script, it's only used by maintainers locally

The script exits with error if it can't install a dependency or run a command, this is problematic when trying to test things locally against python 3.7 since some dependencies like black will fail to install and run.
This allows the scripts to "fail" formatting but still run the unit tests with python 3.7, there might be a better way to do this 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WilliamBergamin Might we move this line with -e to before we run the tests but after linting happens?

I understand now this isn't used in CI but might still find it confusing in development - often exit codes help me build confidence 🧰

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the script so that formatting, linting and typechecking only run when using the latest supported python version and placed -e back into the script

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WilliamBergamin Thanks for these changes! I like the preference to latest version for formatting so much!

pip uninstall -y $package
pip uninstall -y $package &
done
wait
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏳ praise: TIL that not all must be rushed.

@WilliamBergamin WilliamBergamin requested a review from zimeg March 23, 2026 15:57
Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WilliamBergamin LGTM! Thank you for sharing conversation to some of these refinements. The scripts keep improving! 👾 ✨

# all: ./scripts/run_validation.sh
# single: ./scripts/run_validation.sh tests/slack_sdk_async/web/test_web_client_coverage.py

set -e
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WilliamBergamin Thanks for these changes! I like the preference to latest version for formatting so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:patch tests M-T: Testing work only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants